<div class="layui-form" lay-filter="layuiadmin-app-form-list" id="layuiadmin-app-form-list" style="padding: 20px 30px 0 0;">
  <div class="layui-form-item">
    <label class="layui-form-label">用户昵称</label>
    <div class="layui-input-inline" style="width: 450px;">
      <script type="text/html" template>
        <input type="text" name="name" value="{{ d.params.name || '沛霖主页' }}" lay-verify="required" placeholder="用户昵称" autocomplete="off" class="layui-input">
      </script>
    </div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">留言内容</label>
    <div class="layui-input-inline" style="width: 450px;">
      <script type="text/html" template>
         <textarea name="description" placeholder="" class="layui-textarea">{{ d.params.description || '' }}</textarea>
      </script>
    </div>
  </div>
  <script type="text/html" template>
    <input type="hidden" name="id" value="{{ d.params.id || '' }}">
  </script>

  <script type="text/html" template>
    <input type="hidden" name="lang" value="{{ layui.data('lang').lang }}">
  </script>

  <div class="layui-form-item">
    <label class="layui-form-label"></label>
    <div class="layui-input-inline">
      <input type="button" lay-submit lay-filter="layuiadmin-app-form-submit" value="确认" class="layui-btn">
    </div>
  </div>
</div>
<script>
layui.use(['admin', 'form', 'upload'], function(){
  var $ = layui.$
  ,form = layui.form
  ,upload = layui.upload;

  //上传头像
  upload.render({
    elem: '#layuiadmin-upload-useradmin'
    ,url: '/api/report/upload'
    ,accept: 'images'
    ,method: 'get'
    ,acceptMime: 'image/*'
    ,done: function(res){
      $(this.item).prev("div").children("input").val(res.data.src)
    }
  });

  form.on('radio(status)', function(data){
    // console.log(data.elem); //得到radio原始DOM对象
    console.log(data.value); //被点击的radio的value值
  });  

})
</script>